# https://docs.bazel.build/versions/master/be/c-cpp.html#cc_binary
cc_binary(
    name = "rocksdb",
    srcs = glob(["include/*.h", "src/*.cpp"]),
    copts = ["-Iinclude"],
    deps = [
        "@rocksdb//rocks:rocks",
        ],
    linkopts = ["-lz", "-ldl", "-lbz2", "-llz4"],

)


cc_binary(
    name = "test_update",
    srcs = glob(["include/*.h", "src/test_update.cpp"]),
    copts = ["-Iinclude"],
    deps = [
        "@rocksdb//rocks:rocks",
        ],
    linkopts = ["-lz", "-ldl", "-lbz2"],

)



cc_binary(
    name = "test_rocks",
    srcs = glob(["include/*.h", "src/test_rocks.cpp"], 
            exclude = ["src/main.cpp"]),
    copts = ["-Iinclude"],
    deps = [
        "@rocksdb//rocks:rocks",
        ],
    linkopts = ["-lz", "-ldl", "-lbz2"],

)

cc_binary(
    name = "read_rocks",
    srcs = glob(["include/*.h", "src/read_rocks.cpp"], 
            exclude = ["src/main.cpp"]),
    copts = ["-Iinclude"],
    deps = [
        "@rocksdb//rocks:rocks",
        ],
    linkopts = ["-lz", "-ldl", "-lbz2", "-llz4"],

)


cc_binary(
    name = "test_prefix",
    srcs = glob(["include/*.h", "src/test_prefix.cpp"]),
    copts = ["-Iinclude"],
    deps = [
        "@rocksdb//rocks:rocks",
        ],
    linkopts = ["-lz", "-ldl", "-lbz2", "-llz4"],

)


cc_binary(
    name = "test_ttl",
    srcs = glob(["include/*.h", "src/test_ttl.cpp"]),
    copts = ["-Iinclude"],
    deps = [
        "@rocksdb//rocks:rocks",
        ],
    linkopts = ["-lz", "-ldl", "-lbz2", "-llz4"],

)